package com.kimehwa.studyboot.bean.mongobean;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.List;

/**
 * @author xiaodongguan
 * @description
 * @since 2021-07-22 17:23
 */
@Document
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class User {
    @Id
    private Long id;
    @Field("user_name")
    private String userName;

    private String note;

    private List<Role> roles = null;
}
